-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-117721: use PyMutex in _thread.lock
#125110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Minor comments below
|
@kumaraditya303, see #125058. We should check if this makes |
It doesn't, it is not interruptible. |
|
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @kumaraditya303, I could not cleanly backport this to |
|
GH-125116 is a backport of this pull request to the 3.13 branch. |
(cherry picked from commit fca5529)
|
This change introduced a regression: #125451. |
IMO this change should not be backported to 3.13 in a bugfix release. It's too big, it can cause regression as you can see. |
|
I don't think there's a bug in |
Changes:
PyMutexinstead ofPyThread_type_lockPy_TPFLAGS_MANAGED_WEAKREF_thread.lock.release()is not thread-safe in free-threaded builds #117721